Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-15200] add "generated credential" screen reader notification #12877

Merged
merged 7 commits into from
Jan 24, 2025

Conversation

audreyality
Copy link
Member

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-15200

📔 Objective

Notify users with screen readers when a new credential is generated.

📸 Screenshots

N/A

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Logo
Checkmarx One – Scan Summary & Details3ea58dff-f54b-4397-a550-04121a98b2f7

New Issues (2)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
LOW Client_Hardcoded_Domain /apps/web/src/app/billing/shared/payment/payment.component.ts: 75
detailsThe JavaScript file imported in "https://js\.stripe\.com/v3/?advancedFraudSignals=false" in /apps/web/src/app/billing/shared/payment/payment.componen...
Attack Vector
LOW Client_Hardcoded_Domain /apps/web/src/app/billing/shared/payment/payment.component.ts: 75
detailsThe JavaScript file imported in "https://js\.stripe\.com/v3/?advancedFraudSignals=false" in /apps/web/src/app/billing/shared/payment/payment.componen...
Attack Vector

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 84.21053% with 3 lines in your changes missing coverage. Please review.

Project coverage is 35.24%. Comparing base (315e133) to head (945a793).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...-form/components/options/send-options.component.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12877      +/-   ##
==========================================
+ Coverage   35.13%   35.24%   +0.11%     
==========================================
  Files        3001     2997       -4     
  Lines       91369    90881     -488     
  Branches    17102    16972     -130     
==========================================
- Hits        32104    32034      -70     
+ Misses      56758    56359     -399     
+ Partials     2507     2488      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@audreyality audreyality marked this pull request as ready for review January 17, 2025 20:27
@audreyality audreyality requested a review from a team as a code owner January 17, 2025 20:27
@audreyality audreyality added the needs-qa Marks a PR as requiring QA approval label Jan 17, 2025
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ There's a lot of repetition in the generator files because the generator output box needs to be factored out into a separate component (PM-16235).

@@ -205,6 +213,10 @@ export class PasswordGeneratorComponent implements OnInit, OnDestroy {
});
}

private announce(message: string) {
this.ariaLive.announce(message).catch((e) => this.logService.error(e));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 I tried writing this using a custom aria region and it simply wouldn't work. Luckily, @willmartian pointed out the LiveAnnouncer works. I wrapped it in a method so that the promise handling doesn't clutter up the observable bindings, which are already fairly complex.

@@ -161,10 +162,10 @@ export type SingleUserDependency = {
* @remarks This dependency is useful when you have a nondeterministic
* or stateful algorithm that you would like to run when an event occurs.
*/
export type OnDependency = {
export type OnDependency<T = any> = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 The = any default type preserves existing uses of the OnDependency, which use emissions without using the emitted value. The T type parameter allows consumers to specify a specific type for when the observer requires invocation-specific arguments.

prograhamming
prograhamming previously approved these changes Jan 23, 2025
@audreyality audreyality changed the title [PM-15200] first pass at "generated credential" screen reader notifications [PM-15200] add "generated credential" screen reader notification Jan 23, 2025
@audreyality audreyality removed the needs-qa Marks a PR as requiring QA approval label Jan 24, 2025
@audreyality audreyality enabled auto-merge (squash) January 24, 2025 19:19
@audreyality audreyality merged commit 1fc20b5 into main Jan 24, 2025
86 of 88 checks passed
@audreyality audreyality deleted the tools/pm-15200/add-credential-generated-aria-output branch January 24, 2025 19:44
audreyality added a commit that referenced this pull request Jan 24, 2025
)

replaces website$ dependency with `GenerateRequest`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants